package com.wsoft.form.constant;

import cn.hutool.core.date.DateUtil;
import com.wsoft.constant.FieldKindConstant;

import java.util.Arrays;
import java.util.List;

/**
 * @Author z001
 * @Date 2024/8/30 16:32
 */
public class ObjectDefaultColumnConstant {
    public final static String ID = "id";
    public final static String ORG_ID = "org_id";
    public final static String BMP_KEY = "bmp_key";
    public final static String BMP_STATUS = "bmp_status";
    public final static String CREATE_BY = "create_by";
    public final static String CREATE_TIME = "create_time";
    public final static String UPDATE_BY = "update_by";
    public final static String UPDATE_TIME = "update_time";
    public final static String DELETED = "deleted";

    /**
     * 基础字段
     */
    public final static List<String> DEFAULT_COLUMN_LIST = Arrays.asList(ID, ORG_ID,CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DELETED);
    public final static List<String> DEFAULT_COLUMN_NAME_LIST = Arrays.asList("主键", "组织id","创建人", "创建时间", "修改人", "修改时间", "逻辑删除");
    public final static List<String> COLUMN_TYPE_LIST = Arrays.asList("bigint", "bigint", "varchar", "datetime", "varchar", "datetime", "int");
    public final static List<String> FULL_COLUMN_TYPE_LIST = Arrays.asList("bigint(32)","bigint(32)", "varchar(50)", "datetime", "varchar(50)", "datetime", "int(1)");
    public final static List<Integer> FILED_KIND = Arrays.asList(FieldKindConstant.INTEGER,FieldKindConstant.INTEGER,FieldKindConstant.INTEGER,FieldKindConstant.TIME,FieldKindConstant.INTEGER,FieldKindConstant.TIME,FieldKindConstant.INTEGER);


    /**
     * 基础字段+ 工作流
     */
    public final static List<String> DEFAULT_COLUMN_BMP_LIST = Arrays.asList(ID,BMP_KEY,BMP_STATUS, ORG_ID,CREATE_BY, CREATE_TIME, UPDATE_BY, UPDATE_TIME, DELETED);
    public final static List<String> DEFAULT_COLUMN_NAME_BMP_LIST = Arrays.asList("主键", "工作流标识","工作流状态","组织id","创建人", "创建时间", "修改人", "修改时间", "逻辑删除");
    public final static List<String> COLUMN_TYPE_BMP_LIST = Arrays.asList("bigint","varchar","varchar", "bigint", "varchar", "datetime", "varchar", "datetime", "int");
    public final static List<String> FULL_COLUMN_TYPE_BMP_LIST = Arrays.asList("bigint(32)","varchar(50)","varchar(50)","bigint(32)", "varchar(50)", "datetime", "varchar(50)", "datetime", "int(1)");
    public final static List<Integer> FULL_FILED_KIND = Arrays.asList(FieldKindConstant.INTEGER,FieldKindConstant.TIME,FieldKindConstant.INTEGER,FieldKindConstant.INTEGER,FieldKindConstant.INTEGER,FieldKindConstant.TIME,FieldKindConstant.INTEGER,FieldKindConstant.TIME,FieldKindConstant.INTEGER);


    public static void main(String[] args) {
        int bmpKey = DEFAULT_COLUMN_BMP_LIST.indexOf("bmp_status");
        System.out.println(bmpKey);
        System.out.println(DateUtil.date());
    }

}
